<template>
  <div class="ant-search">
    <div class="search-bar">
      <div class="search" @click="subSearch">
        <input type="text" disabled placeholder="搜索商品名称搜索" />
      </div>
    </div>
    <div class="search-bar-bg"></div>
  </div>
</template>

<script>
  import {
    mapState
  } from "Vuex";
  // 依赖
  export default {
    methods: {
      subSearch() {
        this.$router.push({
          path: '/pages/search/search',
        })
      },
    }
  };

</script>

<style lang="less">
  .ant-search {
    width: 100%;
  }

  .search-bar-bg {
    height: 45px;
  }

  .search-bar {
    width: 100;
    height: 45px;
    background: rgba(242, 242, 242, 1);
    padding: 5px 15px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }

  .search {
    display: flex;

    input {
      display: block;
      flex: 1;
      height: 70rpx;
      border-radius: 35rpx;
      background: #fff;
      color: #404040;
      font-size: 14px;
      color: rgba(160, 160, 160, 1);
      text-align: center;
      padding: 0 15rpx;
    }

    .search-btn {
      height: 70rpx;
      line-height: 70rpx;
      color: #404040;
      font-size: 14px;
      text-align: right;
      margin-left: 10px;
    }
  }

</style>
